import 'package:fish_redux/fish_redux.dart';
import '../model/order_view_model.dart';
import '../../../app_files.dart';

class UserInfoEditViewState implements Cloneable<UserInfoEditViewState> {
  CheckListItemModel userInfo;
  TextEditingController addressController = TextEditingController();
  TextEditingController phoneController = TextEditingController();

  @override
  UserInfoEditViewState clone() {
    return UserInfoEditViewState()
      ..userInfo = userInfo
      ..addressController = addressController
      ..phoneController = phoneController;
  }
}

UserInfoEditViewState initState(Map<String, dynamic> args) {
  UserInfoEditViewState state = UserInfoEditViewState();
  state.userInfo = args['info'];
  state.addressController.text = state.userInfo.userAddress;
  state.phoneController.text = state.userInfo.phone;
  return state;
}
